home *** CD-ROM | disk | FTP | other *** search
/ Kit PC World De Ampliacion De Windows 95 / Kit PC World de ampliacion de Windows 95.iso / internet / sweeper / samples / olecon~1 / wizards / wizform.frm < prev    next >
Text File  |  1995-12-04  |  8KB  |  258 lines

  1. VERSION 4.00
  2. Begin VB.Form frmMainWizard 
  3.    BorderStyle     =   3  'Fixed Dialog
  4.    Caption         =   "Create Control"
  5.    ClientHeight    =   4050
  6.    ClientLeft      =   2010
  7.    ClientTop       =   1875
  8.    ClientWidth     =   6810
  9.    Height          =   4470
  10.    Left            =   1950
  11.    LinkTopic       =   "Form1"
  12.    MaxButton       =   0   'False
  13.    MinButton       =   0   'False
  14.    ScaleHeight     =   4050
  15.    ScaleWidth      =   6810
  16.    ShowInTaskbar   =   0   'False
  17.    Top             =   1515
  18.    Width           =   6930
  19.    Begin VB.CheckBox chkSatellite 
  20.       Caption         =   "Use Satellite DLL &Localization"
  21.       Height          =   375
  22.       Left            =   1560
  23.       TabIndex        =   8
  24.       Top             =   2400
  25.       Visible         =   0   'False
  26.       Width           =   3015
  27.    End
  28.    Begin VB.ComboBox cboSubClass 
  29.       Height          =   315
  30.       ItemData        =   "WizForm.frx":0000
  31.       Left            =   1440
  32.       List            =   "WizForm.frx":0025
  33.       Style           =   2  'Dropdown List
  34.       TabIndex        =   7
  35.       Top             =   1920
  36.       Visible         =   0   'False
  37.       Width           =   5175
  38.    End
  39.    Begin VB.CheckBox chkSubClass 
  40.       Caption         =   "&Subclass a Windows Control"
  41.       Height          =   375
  42.       Left            =   1560
  43.       TabIndex        =   6
  44.       Top             =   2040
  45.       Visible         =   0   'False
  46.       Width           =   2895
  47.    End
  48.    Begin VB.CheckBox chkLoser 
  49.       Caption         =   "Use only sho&rt filenames"
  50.       Height          =   375
  51.       Left            =   1560
  52.       TabIndex        =   5
  53.       Top             =   2760
  54.       Visible         =   0   'False
  55.       Width           =   5055
  56.    End
  57.    Begin VB.TextBox txtUseful 
  58.       Height          =   375
  59.       Left            =   1440
  60.       TabIndex        =   4
  61.       Text            =   "Text1"
  62.       Top             =   1440
  63.       Visible         =   0   'False
  64.       Width           =   5175
  65.    End
  66.    Begin VB.CommandButton cmdNext 
  67.       Caption         =   "&Next >"
  68.       Default         =   -1  'True
  69.       Height          =   375
  70.       Left            =   4320
  71.       TabIndex        =   1
  72.       Top             =   3555
  73.       Width           =   1095
  74.    End
  75.    Begin VB.CommandButton btnFinishCancel 
  76.       Cancel          =   -1  'True
  77.       Caption         =   "Cancel"
  78.       Height          =   375
  79.       Left            =   5520
  80.       TabIndex        =   2
  81.       Top             =   3555
  82.       Width           =   1095
  83.    End
  84.    Begin VB.CommandButton cmdBack 
  85.       Caption         =   "< &Back"
  86.       Enabled         =   0   'False
  87.       Height          =   375
  88.       Left            =   3240
  89.       TabIndex        =   0
  90.       Top             =   3555
  91.       Width           =   1095
  92.    End
  93.    Begin VB.Label lblMessage 
  94.       Caption         =   "Welcome to the Control Creation Wizard. Please Click ""Next"" to begin."
  95.       Height          =   975
  96.       Left            =   1440
  97.       TabIndex        =   3
  98.       Top             =   240
  99.       Width           =   5175
  100.    End
  101.    Begin VB.Image Image1 
  102.       Height          =   2850
  103.       Left            =   120
  104.       Picture         =   "WizForm.frx":00B5
  105.       Top             =   240
  106.       Width           =   930
  107.    End
  108.    Begin VB.Line Line2 
  109.       BorderColor     =   &H00FFFFFF&
  110.       X1              =   120
  111.       X2              =   6600
  112.       Y1              =   3375
  113.       Y2              =   3375
  114.    End
  115.    Begin VB.Line Line1 
  116.       BorderColor     =   &H00808080&
  117.       X1              =   120
  118.       X2              =   6600
  119.       Y1              =   3360
  120.       Y2              =   3360
  121.    End
  122. End
  123. Attribute VB_Name = "frmMainWizard"
  124. Attribute VB_Creatable = False
  125. Attribute VB_Exposed = False
  126.  
  127. Private Sub btnFinishCancel_Click()
  128.  
  129.     If iStage = STAGE_FINISHING Then
  130.         Unload Me
  131.     Else
  132.         TerminateApplication
  133.     End If
  134.     
  135. End Sub
  136.  
  137.  
  138. Private Sub cbosubclass_Click()
  139.  
  140.     g_szSubClassName = cbosubclass.List(cbosubclass.ListIndex)
  141.  
  142. End Sub
  143.  
  144. Private Sub chkloser_Click()
  145.  
  146.     g_fLoser = chkloser.Value
  147.     
  148. End Sub
  149.  
  150. Private Sub chkSatellite_Click()
  151.  
  152.     g_fSatellite = chkSatellite.Value
  153.     
  154. End Sub
  155.  
  156. Private Sub cmdBack_Click()
  157.  
  158.     iStage = iStage - 1
  159.     If iStage = STAGE_SUBCLASS And chkSubClass.Value <> vbChecked Then iStage = iStage - 1
  160.     m_SwitchPage
  161.     
  162. End Sub
  163.  
  164. Private Sub cmdNext_Click()
  165.  
  166.     If iStage = STAGE_CONTROLNAME And chkSubClass.Value <> vbChecked Then iStage = iStage + 1
  167.     iStage = iStage + 1
  168.     m_SwitchPage
  169.     
  170. End Sub
  171.  
  172. Private Sub Form_Load()
  173.  
  174.     Top = (Screen.Height - Height) / 3
  175.     Left = (Screen.Width - Width) / 2
  176.     
  177. End Sub
  178.  
  179.  
  180. Private Sub m_SwitchPage()
  181.     
  182.     Select Case iStage
  183.         Case STAGE_WELCOME
  184.             lblmessage = "Welcome to the Control Creation Wizard. Please Click ""Next"" to begin."
  185.             chkSatellite.Visible = False
  186.             chkSubClass.Visible = False
  187.             cbosubclass.Visible = False
  188.             txtuseful.Visible = False
  189.             chkSubClass.Visible = False
  190.             chkloser.Visible = False
  191.             cmdBack.Enabled = False
  192.             cmdNext.Enabled = True
  193.             
  194.         Case STAGE_CONTROLNAME
  195.             lblmessage = "Please Enter a Name for your Control."
  196.             chkSatellite.Visible = True
  197.             txtuseful.Text = szControlName
  198.             chkSubClass.Visible = True
  199.             cbosubclass.Visible = False
  200.             chkloser.Visible = True
  201.             txtuseful.Visible = True
  202.             cmdBack.Enabled = True
  203.             cmdNext.Enabled = True
  204.             txtuseful.SetFocus
  205.  
  206.         Case STAGE_SUBCLASS
  207.             lblmessage = "Please Choose a control class on which to base your control."
  208.             chkSatellite.Visible = False
  209.             chkSubClass.Visible = False
  210.             cbosubclass.Visible = True
  211.             cbosubclass.SetFocus
  212.             chkloser.Visible = False
  213.             txtuseful.Visible = False
  214.             cmdBack.Enabled = True
  215.             cmdNext.Enabled = True
  216.  
  217.         Case STAGE_CONTROLDIR
  218.             lblmessage = "Please Enter the location you'd like the source files to go."
  219.             chkSatellite.Visible = False
  220.             chkSubClass.Visible = False
  221.             cbosubclass.Visible = False
  222.             txtuseful.Text = szFinalDir
  223.             txtuseful.Visible = True
  224.             cmdBack.Enabled = True
  225.             chkloser.Visible = False
  226.             cmdNext.Enabled = True
  227.             txtuseful.SetFocus
  228.  
  229.         Case STAGE_FINISHING
  230.             lblmessage = "Thank you.  Please Choose Finish to Complete the Creation of your control."
  231.             chkSatellite.Visible = False
  232.             chkSubClass.Visible = False
  233.             cbosubclass.Visible = False
  234.             txtuseful.Visible = False
  235.             chkloser.Visible = False
  236.             cmdBack.Enabled = True
  237.             cmdNext.Enabled = False
  238.             btnFinishCancel.Caption = "&Finish"
  239.             btnFinishCancel.SetFocus
  240.             
  241.     End Select
  242.                 
  243.             
  244.             
  245. End Sub
  246.  
  247. Private Sub txtuseful_Change()
  248.  
  249.     Select Case iStage
  250.         Case STAGE_CONTROLNAME
  251.             szControlName = txtuseful.Text
  252.         Case STAGE_CONTROLDIR
  253.             szFinalDir = txtuseful.Text
  254.     End Select
  255.         
  256. End Sub
  257.  
  258.